package com.zgx.plus.system.controller.common;


import com.zgx.plus.common.response.R;
import com.zgx.plus.system.biz.KaptchaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@RestController
public class CaptchaController {
    @Resource
    private KaptchaService kaptchaService;

    /**
     * 生成验证码
     */
    @GetMapping("/captchaImage")
    public R<Map<String, Object>> captchaImage(HttpServletResponse response) throws IOException {
        return kaptchaService.captchaImage();
    }
}


